<template>
  <div class="app-container">
    <el-tabs v-model="activeTab" @tab-change="handleTabChange">
         <el-tab-pane label="项目成员" name="member">
        <member-component :project-id="projectId" />
      </el-tab-pane>
      <el-tab-pane label="成员分数" name="source">
        <source-component :project-id="projectId" />
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script setup>
import { useRoute, useRouter } from 'vue-router';
import SourceComponent from '../source/index.vue';
import MemberComponent from '../member/index.vue';

const route = useRoute();
const router = useRouter();
const projectId = ref(route.query.id);
const projectName = ref(route.query.projectName);
const activeTab = ref('member');

function handleTabChange(tabName) {
  activeTab.value = tabName;
}

</script>